<?php
 	ini_set("include_path", ".:../:./includes:../includes");

	extract($_REQUEST);
	require_once("includes/constants.php");
	require_once("includes/database.php");

	if (updateEmployee($selectedEmployee, strtolower($e_email) , $e_phone_no ,$e_hours_per_day) != 0) {
		$confirmationMessage = "$e_firstname $e_surname records have been updated." ;
		$_SESSION[EMPLOYEES] = getAllEmployees(); //update employee list in session 
		header( 'Location: confirmationPage.php?' . "confirmationMessage=" .$confirmationMessage) ;
		//require("confirmationPage.php");
	}
	else {
		$errorMessage = "There has been a problem updating details for $e_firstname $e_surname.";
		header( 'Location: errorPage.php?' . "errorMessage=" . $errorMessage ) ;
		//require("errorPage.php");
		//checking svn difference
	}	
	;

?>
